﻿@model CoreData.Album
@{ 
    ViewBag.Title = "Add or Update Album";
}
<div class="row-fluid">
    <div class="span12">
       <div class="head">
            <div class="isw-documents">
            </div>
            <h1>
               Detail</h1>
                 <li>
            <ul class="buttons">
                    <li><a href="#" class="isw-settings"></a>
                        <ul class="dd-list" style="display: none;">
                         @if (Helper.SessionManagement.Value("pvalue").Contains("C"))
                         {
                            <li><a href="@Url.Action("AddOrUpdate", "AlbumManagement")"><span class="isw-plus"></span>Add new</a></li>
                         }
                        </ul>
                    </li>
            </ul>
        </li>
            <div class="clear">
            </div>
        </div>
        <div class="block-fluid tabs">
            <ul>
                <li><a href="#tabs-1">Content</a></li>
                
            </ul>
            @using (Ajax.BeginForm("AddOrUpdate", "AlbumManagement", new AjaxOptions { OnSuccess = "Success", HttpMethod = "Post" }, new { enctype = "multipart/form-data", @id = "validation" }))
            {
                <div class="warning-area">
                </div>
                <div id="tabs-1">
                     @Html.HiddenFor(model => model.ID)
                <div class="row-form">
                    <div class="span2">
                        Title:</div>
                    <div class="span9">
                      @*  @Html.TextBoxFor(x => x.Name, new { @class = "validate[required,funcCall[ExistCategoryName[this]]]" })</div>*@
                          @Html.TextBoxFor(x => x.Name, new { @class = "validate[required]" })</div>
                    <div class="clear">
                    </div>
                </div>
               
                <div class="row-form">
                    <div class="span2">
                        Image :</div>
                    <div class="span8">
                       
                        <input id="fileupload" type="file" name="file" />
                        @if (Model != null && Model.Image != null && Model.Image != "")
                        {
                            <div id="image">
                          <img src="@Url.Content("~/Media/Album/" + Model.Image)" width="70px" height="70px" alt="@Model.Image" />
                            </div>
                        } else
                            {
                                <div id="image"> 
                                 </div>
                            }
                    </div>
                    <div class="clear">
                    </div>
                </div>
                
               
                <div class="row-form">
                    <div class="span2">
                        Active :</div>
                    <div class="span9">
                        @Html.CheckBoxFor(x => x.Active)</div>
                    <div class="clear">
                    </div>
                </div>
                </div>
             
               
                 if (Helper.SessionManagement.Value("pvalue").Contains("C") || Helper.SessionManagement.Value("pvalue").Contains("U"))
                 {
                <div class="row-form">
                    <div class="span2">
                    </div>
                    <div class="span9">
                        <input type="submit" class="btn btn-info span3" value="Update" /></div>
                    <div class="clear">
                    </div>
                </div>
                 }
            }
        </div>
    </div>
</div>
